<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
	</script>
</head>

<body>
	<button id="btn">点击获取数据</button>



	<script>
		function sendAJAX(url) {
			return new Promise((resolve, reject) => {
				$.ajax({
					url: url,
					success(arr) {
						resolve(arr);
					},
					error(err) {
						reject(err);
					}
				})
			});
		}
		let btn = document.querySelector('#btn');
		let p1 = new Promise(function (resolve, reject) {
			$.ajax({
				url: 'http://59.65.232.233:5080/api_1_0/ssoUser/2023101916543597',
				dataType: 'json',
				success(arr) {
					resolve(arr);
				},
				error(err) {
					reject(err);
				}
			})
		});
		let p2 = new Promise(function (resolve, reject) {
			$.ajax({
				url: 'http://59.65.232.233:5080/api_1_0/ssoUser/2023103116255631',
				dataType: 'json',
				success(arr) {
					resolve(arr);
				},
				error(err) {
					reject(err);
				}
			})
		});
		Promise.all([
			p1,
			p2
		]).then(function (results) {
			console.log(results);
		}, function () {
			console.log("错误");
		});
    </script>
</body>
</html>